package com.chucang.shucang.common.security.feign;

import com.chucang.shucang.common.base.constant.SecurityConstant;
import com.chucang.shucang.common.base.utils.R;
import com.chucang.shucang.common.security.entity.OauthClientDetailsEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author flitsneak
 * @email flitsneak@gmail.com
 * @date 2022/9/16 10:02
 * @description 客户端信息获取
 */
@FeignClient("shucang-sys")
public interface RemoteClientDetailsService {

    /**
     * 获取client信息
     *
     * @param clientId
     * @return
     */
    @GetMapping("/sys/oauthclientdetails/getClientDetailsById/{clientId}")
    R<OauthClientDetailsEntity> getClientDetailsById(@PathVariable("clientId") String clientId, @RequestHeader(SecurityConstant.FROM) String from);
}
